﻿package com.teatrace.model.produce;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.teatrace.model.base.Storage;
/**
 * 原料包的实体类
 * 
 * 对应数据库中的表material_package
 */
@Entity
@Table(name="material_package")
public class MaterialPackage {

	@Id
	@Column(name="material_package_id")
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private int id;//material_package_id
	
	@Column(name="package_time",columnDefinition="date")
	private String packageTime;//package_time
	private String weight;
	private String wrapper;//包装纸的类型
	private String description;
	
	@Column(name="process_status")
	private String processstatus;//加工状态
	
	@ManyToOne(cascade = {CascadeType.ALL},optional=true)
	@JoinColumn(name="storage_id")
	private Storage storage;
	
	@Column(name="storage_status")
	private int status;//对应数据库表中的storage_status，茶叶包存放状态，存放状态有0未入库、1库中、2已出库
	
	@ManyToOne
	@JoinColumn(name="pick_id",updatable=false)
	private Pick pick;

	public String getPackageTime() {
		return packageTime;
	}

	public String getWrapper() {
		return wrapper;
	}

	public String getDescription() {
		return description;
	}

	public int getStatus() {
		return status;
	}

	public void setPackageTime(String packageTime) {
		this.packageTime = packageTime;
	}

	public void setWrapper(String wrapper) {
		this.wrapper = wrapper;
	}

	public void setDescription(String description) {
		this.description = description;
	}


	public void setStatus(int status) {
		this.status = status;
	}



	public String getWeight() {
		return weight;
	}

	public void setWeight(String weight) {
		this.weight = weight;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getId() {
		return id;
	}

	public void setPick(Pick pick) {
		this.pick = pick;
	}

	public Pick getPick() {
		return pick;
	}

	public void setProcessstatus(String processstatus) {
		this.processstatus = processstatus;
	}

	public String getProcessstatus() {
		return processstatus;
	}

	public void setStorage(Storage storage) {
		this.storage = storage;
	}

	public Storage getStorage() {
		return storage;
	}

	
}
